<template>
  <p>当前的值是（我在组件中）：{{title}}</p>
  <input type="text" :value="title" @input="$emit('update:title', $event.target.value)">
</template>

<script>
  export default {
    name: "my-input",
    emits: ['update:title'],
    props: {
      title: String
    }
  }
</script>

<style scoped>
  input {
    width: 100%;
    height: 30px;
  }
</style>
